package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.region.vo.RegionListVO;
import com.cskaoyan.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenai
 * @description TODO
 * @date 2022-06-05 21:36
 */
@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    RegionService regionService;


    @RequestMapping("list")
    public BaseRespVo list() {
        RegionListVO regionListVO = new RegionListVO();
        regionListVO = regionService.allRegion();
        return BaseRespVo.ok(regionListVO);
    }
}
